<template>
  <a-row :gutter="10" style="height: 100%;">
    <a-col :md="5" :sm="24" style="height: 100%;">
      <a-card :bordered="false" style="height: 100%; overflow: auto;">
        <sys-org-tree @onSelect="onSelect"></sys-org-tree>
      </a-card>
    </a-col>
    <a-col :md="19" :sm="24" style="height: 100%;">
      <a-card :bordered="false" style="height: 100%;; overflow: auto;">
        <user-sub-list :deptId="deptId" :portal="portal"></user-sub-list>
      </a-card>
    </a-col>
  </a-row>
</template>

<script>

  import SysOrgTree from '../../components/ych/ych-org/SysOrgTree'
  import UserSubList from './UserSubList'

  export default {
    name: 'UserList',
    components: {
      UserSubList,
      SysOrgTree
    },
    props: {
      portal: {
        type: String,
        default: '0'
      }
    },
    data() {
      return {
        deptId: null
      }
    },
    methods: {
      onSelect(deptId) {
        this.deptId = deptId
      }
    }
  }
</script>
<style lang="less" scoped>

</style>
